package com.demo.consumer2.controller;

import com.demo.consumer2.feign.FeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


import java.util.*;

/**
 * @Author: xiaoxiangjie
 * @Description:
 * @Date: 2021/3/21
 */
@RestController
@RequestMapping("/consumer2Controller")
public class Consumer2Controller {

    @Autowired
    private FeignService feignServer;

    @GetMapping("/getBookInfo")
    public List getBookInfo(@RequestParam("name") String name) {
        return feignServer.getBookInfo(name);
    }

//    @GetMapping("/getBookInfoBak")
//    public List getBookInfoBak(@RequestParam("name") String name) {
//        return null;
//    }
//
//    @GetMapping("/addBookInfo")
//    public String addBookInfo() {
//        return null;
//    }

}
